package com.jfinal.bbsapp.common.config;

public class WebContant {
	
	//用户类型
	public static enum USER_TYPE {
		Web("web"), App("app") , Wx("wx");
		private final String USER_TYPE;
		
		USER_TYPE(String USER_TYPE) {
			this.USER_TYPE = USER_TYPE;
		}
		
		public String getUSER_TYPE() {
			return USER_TYPE;
		}
	}
	
	//返回描述
	public static enum MSG {
		SUCCESS("20000操作成功"),
		TOKEN_FAIL("40000token过期"),
		AUTHORIZED("40300没有操作权限"),
		SYSTEM_ERROR("50000系统异常"),
		FAIL("51000操作失败"),
		VALID_ERROR("52000参数格式不正确"),
		USERNAME_EXIST("52001用户名已存在"),
		USERNAME_NOT_EXIST("52002用户名不存在");
		
		private final String MSG;

		MSG(String MSG) {
			this.MSG = MSG;
		}

		public String getMSG() {
			return MSG;
		}
	}
	
	//返回状态
	public static enum CODE {
		SUCCESS(20000),
		TOKEN_FAIL(40000),
		AUTHORIZED(40300),
		SYSTEM_ERROR(50000),
		FAIL(51000),
		VALID_ERROR(52000),
		USERNAME_EXIST(52001),
		USERNAME_NOT_EXIST(52002);
		
		private final Integer CODE;

		CODE(Integer CODE) {
			this.CODE = CODE;
		}

		public Integer getSTATUS() {
			return CODE;
		}
	}

}
